/**
 * output package name
 */
package com.kingdee.eas.zssh.basedata.client;

import org.apache.log4j.Logger;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
import com.kingdee.bos.ui.face.CoreUIObject;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.zssh.project.ContractBillFactory;
import com.kingdee.eas.zssh.project.ContractBillInfo;

/**
 * output class name
 */
public class NewClientEditUI extends AbstractNewClientEditUI
{
    private static final Logger logger = CoreUIObject.getLogger(NewClientEditUI.class);
    
    /**
     * output class constructor
     */
    public NewClientEditUI() throws Exception
    {
        super();
    }
    /**
     * output loadFields method
     */
    public void loadFields()
    {
        super.loadFields();
    }

    /**
     * output storeFields method
     */
    public void storeFields()
    {
        super.storeFields();
    }

    /**
     * output getBizInterface method
     */
    protected com.kingdee.eas.framework.ICoreBase getBizInterface() throws Exception
    {
        return com.kingdee.eas.zssh.basedata.NewClientFactory.getRemoteInstance();
    }

    /**
     * output createNewData method
     */
    protected com.kingdee.bos.dao.IObjectValue createNewData()
    {
        com.kingdee.eas.zssh.basedata.NewClientInfo objectValue = new com.kingdee.eas.zssh.basedata.NewClientInfo();
        objectValue.setCreator((com.kingdee.eas.base.permission.UserInfo)(com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentUser()));
		String contractId = (String)getUIContext().get("contractId");
		if(contractId!=null){
			try {
				ContractBillInfo info = ContractBillFactory.getRemoteInstance().getContractBillInfo(new ObjectUuidPK(contractId));
				objectValue.setContractNumber(info);
			} catch (EASBizException e) {
				e.printStackTrace();
			} catch (BOSException e) {
				e.printStackTrace();
			}
		}
        return objectValue;
    }

}